<?php
	$tool_buttons = array
	(
		'list_button' => array
		(
			'image'=>'btnListLarge.gif', 
			'text'=>LANG_LIST, 
			'url'=>'/'.$this->name.'/index/'
		)
	);
	
	$this->helpers->html->form('/'.$this->name.'/edit/'.$this->data[$this->name][id]);
	$this->helpers->htmlx->MenuText1(LANG_DELEGATIONS.': '.LANG_EDIT, "edit.gif");
	$this->helpers->toolbars->Toolbar($tool_buttons);
		echo "<table class='eva'>";
		$this->helpers->htmlx->hidden('id', $this->data[$this->name][id]);	
		$this->helpers->htmlx->hidden('user_login_from', $this->data[$this->name][user_login_from]);	
		$this->helpers->htmlx->selectBoxFastSearchRow(LANG_TO_USER, 'user_id_to',$this->data[users], $this->data[$this->name][user_id_to]);
		
		if ($this->data[exist_roles]!=0)
		{
	    	$this->helpers->htmlx->comboBoxRow(LANG_ROLES.'*', 'roles[]',$this->data[user_roles], $this->data[roles],'multiple size="5" class="combobox2"');
		}
	    else
	    {
	    	$this->helpers->htmlx->inputTextRow(LANG_URL, '', $this->data[$this->name][url],'disabled="disabled"');
	    }
	    	
	    $this->helpers->htmlx->inputDateRow(LANG_START_DATE, 'datetime_from', date('d-m-Y H:i', strtotime($this->data[$this->name][datetime_from])));
	    $this->helpers->htmlx->inputDateRow(LANG_END_DATE, 'datetime_to', date('d-m-Y H:i', strtotime($this->data[$this->name][datetime_to])));
	echo "</table>";
	$this->helpers->htmlx->submitTable('submit', $this->name);
	echo "</form>";
?>